﻿<%@ Page Title="" Language="C#" MasterPageFile="~/huongnghiep/frontend.Master" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="VQWEB.huongnghiep.index" %>
<asp:Content ID="Head" ContentPlaceHolderID="Head" runat="server"></asp:Content>
<asp:Content ID="Content" ContentPlaceHolderID="Content" runat="server">    
    <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12 f-content-left">
        <!-- Banner Home -->
        <div class="row f-row hidden-xs">
            <div class="col-md-12">
            <a href="/bo-trac-nghiem.html" title="">
                <img class="img-responsive" src="/images/bo-trac-nghiem.png" alt="" width="100%">
            </a>
            </div>
        </div>
        <!--/ Banner Home -->
        <!-- Search -->
        <div class="row f-row">
            <div class="col-md-12">
            <div class="col-lg-12 f-color group">
                <h4 class="f-tab"><i class="glyphicon glyphicon-search"> </i> Tìm kiếm trường đại học - cao đẳng</h4>
            </div>
            </div>
        </div>
        <div class="row">
            <div class="container ffff">
            <div class="col-lg-12 f-gray group">
                <div class="input-group col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <div class="form-group">
                    <input type="email" class="form-control" id="txtQuery" placeholder="Nhập từ khóa ...">
                    </div>
                </div>
                <div class="input-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
                    <select class="form-control" id="plnhomnganh">
                        <option value="-1">- Chọn nhóm ngành nghề -</option>
                    </select>
                </div>
                <div class="input-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
                    <select class="form-control" id="plnganh">
                        <option value="-1">- Chọn ngành học -</option>
                    </select>
                </div>
                <div class="input-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
                    <select class="form-control" id="plhedaotao">
                        <option value="-1">- Chọn hệ đào tạo -</option>
                    </select>
                </div>
                <div class="input-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
                    <select class="form-control" id="plkhoithi">
                        <option value="-1">- Chọn khối thi -</option>
                    </select>
                </div>
                <div class="input-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
                    <input type="text" class="form-control" id="pldiem" placeholder="Nhập điểm dự kiến ..."></input>
                </div>
                <div class="input-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
                    <select class="form-control" id="pltinhthanh">
                        <option value="-1">- Chọn tỉnh Thành -</option>
                    </select>
                </div>
                <div class="input-group col-lg-4 col-md-4 col-sm-6 col-xs-12 pull-right">
                    <button type="button" class="btn btn-hn btn-block" onclick="doSearch();"><span class="glyphicon glyphicon-search"> </span> Tìm kiếm</button>
                </div>
                </div>
            </div>
        </div>
        <!--/ End Search Home -->
        <!-- Xu hướng nghề nghiệp -->
        <div class="row f-row">
            <div class="col-md-12">
            <div class="col-lg-12 f-color group">
                <h4 class="f-tab"><i class="glyphicon glyphicon-record"> </i> Xu hướng nghề nghiệp</h4>
            </div>
            </div>
        </div>
        <div class="row">
            <div class="container">
            <div class="col-lg-12 f-gray group" id="pl_news">
                <!-- News goes here -->                    
            </div>
            <div class="col-lg-6 col-lg-offset-3 col-md-6 col-md-offset-3 col-sm-6 col-sm-offset-3 col-xs-12">
                <button type="button" class="btn btn-hn btn-block" onclick="loadmore();">Xem thêm ---></button>
            </div>
            </div>
        </div>
        <!--/ End xu hướng nghề nghiệp -->
    </div><!--/ Page content left -->       
</asp:Content>
<asp:Content ID="Script" ContentPlaceHolderID="Script" runat="server">
    <script src="/js/jquery.jqote2.js" type="text/javascript"></script>
    <script type="text/javascript" src="/js/autoNumeric.js"></script>
    <script type="text/javascript" src="/js/common.js"></script>
    <script type="text/javascript">
        jQuery(function ($) {
            $('#pldiem').autoNumeric('init', { dGroup: '3', aSep: '.', aDec: ',', aSign: '', pSign: 's', vMin: '0.0', vMax: '30.0', wEmpty: 'zero', wEmpty: 'sign' });
        });
    </script>
    <script type="text/javascript">
        $(function () {
            $("#auto").tooltip({
                placement: "auto",
                title: "tooltip on auto"
            });
        });
        function doSearch() {
            window.location.href = "/danh-sach-truong.html?q=" + $('#txtQuery').val() + "&nn=" + $('#plnhomnganh').val() + "&n=" + $('#plnganh').val() + "&h=" + $('#plhedaotao').val() + "&k=" + $('#plkhoithi').val() + "&t=" + $('#pltinhthanh').val() + "&d=" + $('#pldiem').val();
        }
    </script>
    <!-- Profession -->
    <script type="text/javascript">
        $(document).ready(function () {
            var pro_url_ashx = "/pro/handler";
            $.post(pro_url_ashx, { cmd: 'FillTraCuu' }, function (data) {
                $.get('/huongnghiep/templates/profession/option.tpl', function (tmpl) {
                    var jsonData = $.parseJSON(data);
                    $("#plnhomnganh").jqoteapp(tmpl, jsonData.nhomnganh);
                    $("#plnganh").jqoteapp(tmpl, jsonData.nganh);
                    $("#plhedaotao").jqoteapp(tmpl, jsonData.hedaotao);
                    $("#plkhoithi").jqoteapp(tmpl, jsonData.khoithi);
                    $("#pltinhthanh").jqoteapp(tmpl, jsonData.tinhthanh);
                });
            });
            $("#plnhomnganh").change(function () {
                $.post(pro_url_ashx, { cmd: "ListNganhByNhom", nhomnganhId: $(this).val() }, function (data) {
                    $.get('/huongnghiep/templates/profession/option.tpl', function(tmpl) {
                        $('#plnganh option:gt(0)').remove();
                        $("#plnganh").jqoteapp(tmpl, $.parseJSON(data));
                    });
                });
            });
        });      
    </script>
    <!-- News -->
    <script type="text/javascript">
        var iPage = 1;
        var iBusy = false;
        var url_ashx = "/news/handler";
        function loadNews(curPage, pageSize) {
            iBusy = true;
            $.post(url_ashx, { curPage: curPage, pageSize: pageSize }, function (data) {
                $.get('/huongnghiep/templates/news/list.tpl', function (tmpl) {
                    $("#pl_news").jqoteapp(tmpl, $.parseJSON(data));
                    iBusy = false;
                    $('#pl_news img').error(function () {
                        $(this).attr('src', '/img/no.jpg');
                    });
                });
            });
        }
        function loadmore() {
            iPage += 1;
            loadNews(iPage, 4);
        }
        $(document).ready(function () {
            loadNews(1, 4);
        });
    </script>      
</asp:Content>